package com.idp.app.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.idp.app.dto.AppVersionDto;
import com.idp.app.dto.AppVersionSearchDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.idp.app.entity.AppVersionEntity;

import java.util.List;

/**
 * 版本维护Mapper
 * @author King
 */
@Mapper
public interface AppVersionMapper extends BaseMapper<AppVersionEntity> {

	/**
	 * 条件查询
	 * @param appVersionSearchDto
	 * @return
	 */
	List<AppVersionDto> getList(AppVersionSearchDto appVersionSearchDto);

	/**
	 * 通过id查询
	 * @param id
	 * @return
	 */
	AppVersionDto getById(String id);

	/**
	 * 根据版本和手机类型查找最终版本
	 * @param versionCode
	 * @param appType
	 * @return
	 */
	AppVersionDto getLastVersion(@Param("versionCode") Integer versionCode, @Param("appType") String appType);
}
